/* 
 * Gneat (http://gneat.org)
 *
 * (C) Copyright 2011 and beyond - Claudio Stella, all rights reserved.
 *
 * This file is part of Gneat.
 *
 * Gneat is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL)
 * as published by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gneat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * and the GNU General Public License, for completeness, along with Gneat.  
 * If not, see <http://www.gnu.org/licenses/>.
 */
package org.neatshell.gneat.client.event.mouse;

import org.neatshell.gneat.client.event.IDomEvent;
import org.neatshell.gneat.client.handler.Handler;
import org.neatshell.gneat.client.presenter.core.Presenter;

public interface IMouseEvent<H extends Handler> extends IDomEvent<H> {
	  /**
	   * Gets the mouse x-position within the browser window's client area.
	   * 
	   * @return the mouse x-position
	   */
	  public int getClientX();
	  
	  /**
	   * Gets the mouse y-position within the browser window's client area.
	   * 
	   * @return the mouse y-position
	   */
	  public int getClientY();
	  
	  /**
	   * Gets the button value. Compare it to
	   * {@link com.google.gwt.dom.client.NativeEvent#BUTTON_LEFT},
	   * {@link com.google.gwt.dom.client.NativeEvent#BUTTON_RIGHT},
	   * {@link com.google.gwt.dom.client.NativeEvent#BUTTON_MIDDLE}
	   * 
	   * @return the button value
	   */
	  public int getNativeButton();
	  
	  /**
	   * Gets the mouse x-position relative to a given element.
	   * 
	   * @param target the element whose coordinate system is to be used
	   * @return the relative x-position
	   */
	  public int getRelativeX(Presenter target);
	  
	  /**
	   * Gets the mouse y-position relative to a given element.
	   * 
	   * @param target the element whose coordinate system is to be used
	   * @return the relative y-position
	   */
	  public int getRelativeY(Presenter target);
	  
	  /**
	   * Gets the mouse x-position on the user's display.
	   * 
	   * @return the mouse x-position
	   */
	  public int getScreenX();

	  /**
	   * Gets the mouse y-position on the user's display.
	   * 
	   * @return the mouse y-position
	   */
	  public int getScreenY();

	  /**
	   * Gets the mouse x-position relative to the event's current target element.
	   * 
	   * @return the relative x-position
	   */
	  public int getX();

	  /**
	   * Gets the mouse y-position relative to the event's current target element.
	   * 
	   * @return the relative y-position
	   */
	  public int getY();
}
